package com.project.mapper;

import com.project.bean.UserBean;
import org.apache.ibatis.annotations.*;

@Mapper
public interface IUserMapper {
    @Select("select *from t_users where u_userName=#{userName} and u_pwd=#{pwd}")
    @ResultMap("userMap")
    public UserBean login(@Param("userName") String userName,
                          @Param("pwd") String pwd);

    @Insert("insert into t_users (pk_userId,u_userName,u_pwd,u_grade,u_birthday) values(#{id},#{userName},#{pwd},#{grade},#{birthday})")
    public void addUser(UserBean user);
}
